package com.mq.dpca.util;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateFormatUtil {
	public static String getNowDateTime()
	  {
	    String result = "";
	    Date now = new Date();
	    SimpleDateFormat sDateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
	    

	    result = sDateFormat.format(now);
	    
	    return result;
	  }
	  
	  public static String getNowDateTimeByFormat()
	  {
	    String result = "";
	    Date now = new Date();
//	    SimpleDateFormat sfd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
	    SimpleDateFormat sfd = new SimpleDateFormat("yyMMddHHmmssSSS");

	    result = sfd.format(now);
	    
	    return result;
	  }
	  
	  public static void main(String[] args) {
		System.out.println(DateFormatUtil.getNowDateTimeByFormat());
	}
}
